package com.epin.common;

import java.io.Serializable;

/**
 * Created by DELL on 2017/7/27.
 */
public class AbstractBean implements Serializable, Cloneable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String status;

    private String message;

    private Object data;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }



    public AbstractBean() {
        super();
        this.status = ResultEnum.OK.getVal();
        this.message = ResultEnum.OK.getName();
        this.data = null;
    }


    public AbstractBean(ResultEnum resultEnum){
        super();
        this.status = resultEnum.getVal();
        this.message = resultEnum.getName();
    }


    public AbstractBean(String status, String message) {
        super();
        this.status = status;
        this.message = message;
    }


    public AbstractBean(String status, String message, Object data) {
        super();
        this.status = status;
        this.message = message;
        this.data = data;
    }


    @Override
    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
            return new AbstractBean();
        }
    }
}
